import { Component, OnInit, Injector } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { Service } from 'app/server/server';
import { CudTableService } from 'app/public/serve/cud-table/cud-table.service';

@Component({
  selector: 'app-base',
  templateUrl: './base.component.html',
  styleUrls: ['./base.component.css']
})
export class BaseComponent implements OnInit {
  srv:Service
  cudSrv:CudTableService
  route:ActivatedRoute
  router:Router
  location:Location

  constructor(
    injector: Injector
  ) {
    this.srv = injector.get(Service)
    this.cudSrv = injector.get(CudTableService)
    this.route = injector.get(ActivatedRoute)
    this.router = injector.get(Router)
    this.location = injector.get(Location)
  }

  ngOnInit() {
  }
  back(){
    this.location.back()
  }
}
